package chapter_3;

public class Test9 {
    public static void main(String[] args) {
        int[] arr = {12,23,45,67,89,98,100,120};
        int index = -1;
        //89 找到下标
        for (int i = 0; i < arr.length; i++){
            if(arr[i] == 89){
                arr[i] = 109;
                index = i;
                break;
            }
        }
        if(index != -1){
            System.out.println("找到了 下标为：" + index);
        }
        for (int i : arr) {
            System.out.println(i);
        }
    }
}
